import { createRouter, createWebHistory } from 'vue-router'
import Crypto from '@/views/tools/Crypto.vue'

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: '/',
      name: 'Home',
      component: () => import('@/views/Home.vue'),
      meta: {
        sitemapPriority: '1.0'
      }
    },
    {
      path: '/projects',
      name: 'Projects',
      component: () => import('@/views/Projects.vue'),
      meta: {
        sitemapPriority: '0.8'
      }
    },
    {
      path: '/essays',
      name: 'Essays',
      component: () => import('@/views/Essays.vue'),
      meta: {
        sitemapPriority: '0.8'
      }
    },
    {
      path: '/blog',
      name: 'Blog',
      component: () => import('@/views/Blog.vue'),
      meta: {
        sitemapPriority: '0.8'
      }
    },
    {
      path: '/tools',
      name: 'Tools',
      component: () => import('@/views/Tools.vue'),
      children: [
        {
          path: 'drools',
          name: 'DroolsGenerator',
          component: () => import('@/views/tools/DroolsGenerator.vue'),
          meta: {
            sitemapPriority: '0.8'
          }
        },
        {
          path: 'timestamp',
          name: 'Timestamp',
          component: () => import('@/views/tools/Timestamp.vue'),
          meta: {
            sitemapPriority: '0.8'
          }
        },
        {
          path: 'qrcode',
          name: 'QrCode',
          component: () => import('@/views/tools/QrCode.vue'),
          meta: {
            sitemapPriority: '0.8'
          }
        },
        {
          path: 'websocket',
          name: 'WebSocketTester',
          component: () => import('@/views/tools/WebSocketTester.vue'),
          meta: {
            sitemapPriority: '0.8'
          }
        },
        {
          path: 'json',
          name: 'JsonTools',
          component: () => import('@/views/tools/JsonTools.vue'),
          meta: {
            sitemapPriority: '0.8'
          }
        },
        {
          path: 'crypto',
          name: 'Crypto',
          component: Crypto
        }
      ]
    }
  ]
})

export default router